package com.zhuang.chapter17.work02;

public class BankAccount {
	/**
	 * 账户号码
	 */
	private int account_number;

	/**
	 * 剩余钱
	 */
	private double leftmoney;

	public int getAccount_number() {
		return account_number;
	}

	public void setAccount_number(int account_number) {
		this.account_number = account_number;
	}

	public double getLeftmoney() {
		return leftmoney;
	}

	public void setLeftmoney(double leftmoney) {
		this.leftmoney = leftmoney;
	}

	public BankAccount(int account_number, double leftmoney) {
		super();
		this.account_number = account_number;
		this.leftmoney = leftmoney;
	}

	public void saveMoney(double money) {
		this.leftmoney += money;
	}

	public void getMoney(double money) {
		this.leftmoney -= money;
	}

	public BankAccount() {
		super();
	}
}
